home *** CD-ROM | disk | FTP | other *** search
/ Sky at Night 2007 June / SAN CD 6-2007 CD-ROM 25.iso / pc / Software / AstroGrav_Win / Java / jre1.6.0 / lib / rt.jar / javax / swing / Spring$ScaleSpring.class (.txt) < prev    next >
Encoding:
Java Class File  |  2006-11-29  |  982 b   |  47 lines

  1. package javax.swing;
  2.  
  3. class Spring$ScaleSpring extends Spring {
  4.    // $FF: renamed from: s javax.swing.Spring
  5.    private Spring field_0;
  6.    private float factor;
  7.  
  8.    private Spring$ScaleSpring(Spring var1, float var2) {
  9.       this.field_0 = var1;
  10.       this.factor = var2;
  11.    }
  12.  
  13.    public int getMinimumValue() {
  14.       return Math.round((float)(this.factor < 0.0F ? this.field_0.getMaximumValue() : this.field_0.getMinimumValue()) * this.factor);
  15.    }
  16.  
  17.    public int getPreferredValue() {
  18.       return Math.round((float)this.field_0.getPreferredValue() * this.factor);
  19.    }
  20.  
  21.    public int getMaximumValue() {
  22.       return Math.round((float)(this.factor < 0.0F ? this.field_0.getMinimumValue() : this.field_0.getMaximumValue()) * this.factor);
  23.    }
  24.  
  25.    public int getValue() {
  26.       return Math.round((float)this.field_0.getValue() * this.factor);
  27.    }
  28.  
  29.    public void setValue(int var1) {
  30.       if (var1 == Integer.MIN_VALUE) {
  31.          this.field_0.setValue(Integer.MIN_VALUE);
  32.       } else {
  33.          this.field_0.setValue(Math.round((float)var1 / this.factor));
  34.       }
  35.  
  36.    }
  37.  
  38.    boolean isCyclic(SpringLayout var1) {
  39.       return this.field_0.isCyclic(var1);
  40.    }
  41.  
  42.    // $FF: synthetic method
  43.    Spring$ScaleSpring(Spring var1, float var2, Spring.1 var3) {
  44.       this(var1, var2);
  45.    }
  46. }
  47.